Stream token usage on every agent message#5342
Conversation
* 'main' of github.com:block/goose: Break compaction back into check_ and do_ compaction (#5212) fix: revert built app name to uppercase Goose (#5206) feat: add Code Documentation Generator recipe (#5121) (#5125) Revert "feat: enhance goose to search sessions for easy recall (#5177)" (#5209)
* 'main' of github.com:block/goose: Rewrite extension management tools (#5057) fix: re-sync package-lock.json (#5235) docs: Hacktoberfest MCP youtube short entry to community-content.json (#5150) feat: add schedule button to recipe entries (#5217) Autocompact threshold UI cleanup (#5232) fix: correct schema for openai tools (#5229)
* 'main' of github.com:block/goose: docs: provide more clarity in tagging step of releases (#5269) docs: add GOOSE_DEBUG environment variable (#5265) Lifei/UI parameter input (#5222) turn off WAL (#5203) Skip subagents for gemini (#5257) Revert "Standardize Session Name Attribute" (#5250) improve provider request logging a bit (#5236) Fix OpenAI empty choices panic (#5248) Revert "Rewrite extension management tools" (#5243) Standardize Session Name Attribute (#5085) Docs: Include step-by-step model configuration instructions for first… (#5239) Delete message visibility filter (#5216) delete flaky pricing integration tests (#5207) chore: upgrade most npm packages to latest (#5185) Release/1.11.0 (#5224)
Changes: - Replace "manual-compact" command with "/compact" for better UX - Remove all traces of setChatState exposure from TypeScript codebase - Remove setMessages prop from ChatInput component The setChatState exposure was a bad abstraction that enabled incorrect state manipulation. Now state is controlled entirely by the server through message content, with only internal useState usage remaining. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…message * 'main' of github.com:block/goose: Add bottom menu extension selection (#5352)
|
@katzdave can you resolve the conflicts when you get a chance? |
Done |
zanesq
left a comment
There was a problem hiding this comment.
LGTM tested locally and token count is much better.
One question: what happens when multiple agents/requests update the same session concurrently would it lose the updates?
| setRecipeUserParams: (values: Record<string, string>) => Promise<void>; | ||
| stopStreaming: () => void; | ||
| sessionLoadError?: string; | ||
| tokenState?: TokenState; |
There was a problem hiding this comment.
Should this be optional? When would tokenState not be available?
There was a problem hiding this comment.
Fixed; had thought it was more widely used.
|
I think this fixes #3538 also in my testing |
I think it should be fine, since all of the updates are just pulling the latest state from the session on every message.
Nice! I think desktop will need one more small fix for this but, very close. |
* 'main' of github.com:block/goose: (81 commits) nextcamp - fix session resume when navigating back to chat in sidebar (#5370) feat/fix: set optional config params, and don't overwrite unset secrets (#5325) Stringly typed config (#5463) Fix: Compaction client <-> server sync (#5481) docs: recipe activity parameter substitution (#5462) only run fork on branch PRs (#5461) docs: video on goose with apify mcp (#5472) Clear windows and fix build failure (#5452) Add menu option for setting window always on top (#5429) Delete environment variable (#5479) chore: upgrade rmcp to 0.8.3 (#5458) docs: add "Building Custom Tools and Extensions for Goose" (#5469) Doc (Blog): Managing goose Configurations Across Multiple Projects (#5467) apify doc fix (#5460) Stream token usage on every agent message (#5342) rpm install in /opt/Goose to avoid conflicts with chrome-sandbox (#5421) Don't disable extensions after they fail to activate in new chat session (#5464) Add OTLP logs layer (#5386) openapi to locust load test generator recipe (#5447) technical debt tracker recipe (#5451) ... # Conflicts: # ui/desktop/src/components/ChatInput.tsx
* main: (45 commits) Change Recipes Test Script (#5457) Goose recover (#5450) don't start the default provider (#5351) keep the order of keys in config.yaml (#5468) Removed drafts and agentIsReady in ChatInput (#5366) nextcamp - fix session resume when navigating back to chat in sidebar (#5370) feat/fix: set optional config params, and don't overwrite unset secrets (#5325) Stringly typed config (#5463) Fix: Compaction client <-> server sync (#5481) docs: recipe activity parameter substitution (#5462) only run fork on branch PRs (#5461) docs: video on goose with apify mcp (#5472) Clear windows and fix build failure (#5452) Add menu option for setting window always on top (#5429) Delete environment variable (#5479) chore: upgrade rmcp to 0.8.3 (#5458) docs: add "Building Custom Tools and Extensions for Goose" (#5469) Doc (Blog): Managing goose Configurations Across Multiple Projects (#5467) apify doc fix (#5460) Stream token usage on every agent message (#5342) ...
Signed-off-by: fbalicchia <fbalicchia@gmail.com>
Signed-off-by: Blair Allan <Blairallan@icloud.com>
Token usage gets saved to the session every turn, so just pull that.